home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 207 / 207.d81 / t.tricks ii < prev    next >
Text File  |  2022-08-26  |  7KB  |  273 lines

  1. u
  2.     J O H N N Y ' S    T R I C K S
  3.  
  4.     by John "The Mad Gamer" Harris
  5.  
  6.  
  7.     Now that I've encountered FAME AND
  8. FORTUNE as well as BIG BUCKS
  9. submitting programs to LOADSTAR,
  10. everyday-people-on-the-street are
  11. stopping me and telling me: 'You need
  12. a shave.' So I remind them of a few
  13. things. Like that I, John William
  14. Harris, am the VERY SAME JOHNNY WHO
  15. WROTE JOHNNY'S TRICKS!!! And the
  16. person, now understanding perfectly,
  17. calls the local Facility for the
  18. Mentally Disturbed. So I guess I'll
  19. have to submit another program before
  20. they come haul me away.
  21.  
  22.     This is a series of machine
  23. language routines designed for use in
  24. your own programs. In most cases, a
  25. quick SYS and a few parameters are all
  26. that it will take, and people will
  27. soon be stopping YOU on the street and
  28. telling YOU to shave.
  29.  
  30.     To use "tricks.o" in your BASIC
  31. program, just load the ML into place
  32. at $C000 (49152) with this line:
  33.  
  34.   sys57812"tricks.o",dv,0:poke780,0
  35.   poke781,0:poke782,192:sys65493
  36.  
  37.  and all of the following tricks are
  38. at your disposal. Here are directions
  39. for each trick:
  40.  
  41.  
  42.  [COPYROM]
  43.   Address:49152
  44.   Format:SYS 49152,CSS
  45.   (CSS stands for Character Set
  46.     Start.)
  47.  
  48.  What it does: Puts a copy of the ROM
  49. set starting at the address you
  50. specify. So, to copy the ROM set to
  51. 34816, the character set location used
  52. in the demo, just enter
  53. SYS49152,34816.
  54.  
  55.  
  56.  [CLEARSET & RSTORSET]
  57.   Addresses:49251 and 49277
  58.   Format:SYS49251,CSS
  59.          SYS49277,CSS
  60.  
  61.  By directly altering character
  62. memory, this makes it appear that all
  63. the characters on the screen are
  64. sliding off. RSTORSET does the
  65. opposite, making them slide back on.
  66. To use RSTORSET, you've got to use
  67. REMBRSET first. (see below)
  68.  
  69.  
  70.  [FADEOUT & FADEIN]
  71.   Addresses:49442 and 49477
  72.   Format:SYS49442,CSS,speed
  73.          SYS49477,CSS,speed
  74.  
  75.  Remember that nifty MIST routine that
  76. LOADSTAR's title screen used to use?
  77. This is a version for custom character
  78. sets. FADEOUT fades the set out, and
  79. FADEIN does the opposite. To use
  80. FADEIN, you've got to use REMBRSET
  81. first.
  82.  
  83.  
  84.  [RVRSESET]
  85.   Address:49674
  86.   Format:SYS49674,CSS
  87.  
  88.  Simply reverses the set specified,
  89. turning it into a photographic
  90. negative of itself.
  91.  
  92.  
  93.  [XORSET]
  94.   Address:49722
  95.   Format:SYS49722,CSS,number to be
  96.     XORed
  97.  
  98.  Exclusive-ORs every byte in every
  99. character by the number you give.
  100. Thus, it's a little bit technical by
  101. definition. See the demo program for
  102. a few ways you can use it.
  103.  
  104.  
  105. *SCRWEDGE
  106.   Address:49778
  107.   Format:SYS49778,start in memory of
  108.    the character in question,direction
  109.  
  110.  Think back to Jon Mattson's MAZE
  111. CHASE, published many centuries ago.
  112. Remember how you stared at that title
  113. screen, with it's moving grid
  114. background? While I'm not sure, I
  115. think this was how it was done. It
  116. wedges into the interrupt routine, and
  117. directly changes the graphics
  118. information for one character, whose
  119. start address you specify.
  120.  
  121.  This might not seem like much, but if
  122. you fill the whole screen with this
  123. character, like in the title screen
  124. for MAZE CHASE, it looks like the
  125. screen is scrolling without having to
  126. resort to any messy smooth scrolling
  127. routines. If you are using sprites,
  128. this is all you need to create an
  129. illusion of motion. The value for the
  130. 'direction' in the SYS statement works
  131. out like this:
  132.  
  133.   1-scroll down
  134.   2-scroll up
  135.   4-scroll right
  136.   8 scroll left
  137.  
  138.  If you want to combine two
  139. directions, OR them together. (Up and
  140. left would be 2 OR 8, or 10.)
  141.  
  142.  Also, there are two additional
  143. features to this routine. By ORing
  144. the direction number by 16, you
  145. activate joystick mode. With this,
  146. when you push the joystick in port #2
  147. in a direction, the character will
  148. scroll in the OPPOSITE direction, so
  149. if you have, say, a spaceship on the
  150. screen, it looks like the ground,
  151. stars, etc. are passing by below you.
  152. If you provide sprites moving in the
  153. same direction, this effect might
  154. prove helpful in games.
  155.  
  156.  If you OR the direction number with
  157. 32, you activate flash mode, in which
  158. the wedge not only scrolls the
  159. character, but reverses it too. Since
  160. it does this every time the interrupt
  161. comes around, it looks like the
  162. screen's flashing. Great for
  163. explosions.
  164.  
  165.  
  166.  [WEDGEOFF]
  167.   Address:50009
  168.   Format:SYS50009
  169.  
  170.  Turns off the wedge. (see above)
  171.  
  172.  
  173.  [SPREDSET]
  174.   Address:50022
  175.   Format:SYS50022,CSS
  176.  
  177.  Widens stuff. It puts a pixel to the
  178. left and to the right of every pixel
  179. already on the screen every time you
  180. call it.
  181.  
  182.  
  183. [RUBSET]
  184.   Address:50084
  185.   Format:SYS50084,CSS
  186.  
  187.  I admit it, I couldn't think of a
  188. good name for this one. It sort of
  189. 'tears' everything apart. Most
  190. effective on a screen with a lot of
  191. reversed characters.
  192.  
  193.  
  194.  [RTRVESET and REMBRSET]
  195.   Addresses:50276 and 50301
  196.   Format:SYS50276,CSS
  197.          SYS50301,CSS
  198.  
  199.  Calling REMBRSET stores a copy of the
  200. set starting at the location you gave
  201. it in a 'buffer' starting at 51200.
  202. Routines that require a set to
  203. operate, like FADEIN and RSTORSET get
  204. the{SHIFT-*}information from here. Here's an
  205. example of how you use it.
  206.  
  207.   SYS REMBRSET,S1
  208.   SYS FADEOUT,S1
  209.   SYS R1,102
  210.   SYS FADEIN,S1
  211.  
  212.  Assuming the VIC-II chip is expecting
  213. character information at S1, SYS
  214. REMBRSET,S1 stores a copy of the set
  215. in the buffer. SYS FADEOUT,S1 fades
  216. the screen to black, providing an
  217. eye-catching effect but destroying the
  218. current character set in the process.
  219. SYS R1,102 fills the screen with
  220. character 102 (the checkerboard
  221. pattern), and SYS FADEIN,S1 copies the
  222. stored character set from the buffer
  223. back into the current character set,
  224. one pixel at a time. Please note the
  225. SYS R1,102 command isn't nessesary.
  226.  
  227.  
  228.  [SCREEN FILL]
  229.   Address:50171
  230.   Format:SYS50171,character number
  231.  
  232.  Fill the current screen, based on
  233. location 648, with the character you
  234. tell it to.
  235.  
  236.  
  237.  [COLOR FILL]
  238.   Address:50224
  239.   Format:SYS50224,color number
  240.  
  241.  Puts the color you want in color
  242. memory (55296).
  243.  
  244.  
  245.  
  246.      Well, that's it. Of course, all
  247. of these things are demonstrated in
  248. the Demo program. You can either
  249. select something from the menu, or
  250. push a number key for a 'quickie'
  251. example. Another new feature is a
  252. display that shows the command syntax
  253. for each routine.
  254.  
  255.     And don't forget you don't really
  256. need a custom set for this program.
  257. You can simply copy the ROM set to a
  258. free area of memory, set the VIC-II
  259. registers to get the character info
  260. from there, and off you go. But if
  261. you do use a custom character set, to
  262. make sure nothing happens to it, load
  263. it into an unused area of memory and
  264. then copy it into place by
  265. REMBRSETing it and RETRVESETing it to
  266. the place VIC-II needs it. That way,
  267. if for some reason you destroy the
  268. copy, you don't have to reload it.
  269. Just make another copy.
  270.  
  271.  JH-TMG
  272.  
  273.  
  274.